import { getCircuitList } from "@/utils/method.js";

export default {
  data() {
    return {
      statusText: '',
      detailsData: {
        other_description: {}
      }
    }
  },
  methods: {
    // 页面的动态值
    indexchange(e) {
      this.index = e;
      getCircuitList(this.pagedata)
        .then((res) => {
          this.tableData = res.data.data.data;
          this.total_count = res.data.data.total_count;
        })
        .catch((error) => {
          console.log(error);
        });
    },
    // 改变页码时数据变动
    currentChange(val) {
      console.log(val);
      this.pagedata.page_no = val;
      getCircuitList(this.pagedata)
        .then((res) => {
          this.tableData = res.data.data.data;
          this.total_count = res.data.data.total_count;
        })
        .catch((error) => {
          console.log(error);
        });
    },
    // 旅行社获取线路详情
    goDetails(data) {
      // console.log(data);
      this.$router.push({
        name: 'circuitDetails',
      })
      let data1 = JSON.stringify(data)
      window.localStorage.setItem('circuitDetails', data1)

      // this.$message({
      //   message: "请耐心等待审核哦 😊",
      //   type: 'success'
      // })
    },
  },
}